package com.itheima.aliyunsmsspringbootstart.config;

import com.itheima.aliyunsmsspringbootstart.pojo.AliyunSmsProperties;
import com.itheima.aliyunsmsspringbootstart.service.AliyunSmsService;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 自动生成AliyunSmsService的bean
 * @author 郭文亮
 * @since 2021/11/22 23:25
 */

@Configuration
@EnableConfigurationProperties(AliyunSmsProperties.class)
public class AutoConfigure {
    @Bean
    public AliyunSmsService getBean(AliyunSmsProperties aliyunSmsProperties){
        return new AliyunSmsService(aliyunSmsProperties);
    }
}

